home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection Student Program / ADC Tools Sampler CD Disk 3 1999.iso / Metrowerks CodeWarrior / Java Support / Java_Source / Java2 / src / javax / accessibility / AccessibleHypertext.java < prev    next >
Encoding:
Java Source  |  1999-05-28  |  2.3 KB  |  72 lines  |  [TEXT/CWIE]

  1. /*
  2.  * @(#)AccessibleHypertext.java    1.4 98/08/26
  3.  *
  4.  * Copyright 1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package javax.accessibility;
  16.  
  17.  
  18. import java.lang.*;
  19. import java.util.*;
  20. import java.awt.*;
  21. import javax.swing.text.*;
  22.  
  23.  
  24. /**
  25.  * <P>The AccessibleHypertext class is the base class for all
  26.  * classes that present hypertext information on the display.  This class
  27.  * provides the standard mechanism for an assistive technology to access
  28.  * that text via its content, attributes, and spatial location.
  29.  * It also provides standard mechanisms for manipulating hyperlinks.
  30.  * Applications can determine if an object supports the AccessibleHypertext
  31.  * interface by first obtaining its AccessibleContext (see {@link Accessible})
  32.  * and then calling the {@link AccessibleContext#getAccessibleText}
  33.  * method of AccessibleContext.  If the return value is a class which extends
  34.  * AccessibleHypertext, then that object supports AccessibleHypertext.
  35.  *
  36.  * @see Accessible
  37.  * @see Accessible#getAccessibleContext
  38.  * @see AccessibleContext
  39.  * @see AccessibleText
  40.  * @see AccessibleContext#getAccessibleText
  41.  *
  42.  * @version
  43.  * @author    Peter Korn
  44.  */
  45. public interface AccessibleHypertext extends AccessibleText {
  46.  
  47.     /**
  48.      * Returns the number of links within this hypertext doc.
  49.      *
  50.      * @return number of links in this hypertext doc.
  51.      */
  52.     public abstract int getLinkCount();
  53.  
  54.     /**
  55.      * Returns the nth Link of this Hypertext document.
  56.      *
  57.      * @param linkIndex within the links of this Hypertext
  58.      * @return Link object encapsulating the nth link(s)
  59.      */
  60.     public abstract AccessibleHyperlink getLink(int linkIndex);
  61.  
  62.     /**
  63.      * Returns the index into an array of hyperlinks that
  64.      * is associated with this character index, or -1 if there
  65.      * is no hyperlink associated with this index.
  66.      *
  67.      * @param charIndex index within the text
  68.      * @return index into the set of hyperlinks for this hypertext doc.
  69.      */
  70.     public abstract int getLinkIndex(int charIndex);
  71. }
  72.